package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * FaJournal generated by hbm2java
 */
@Entity
@Table(name="fa_journal"
    ,catalog="ncsc_erp"
)
public class FaJournal  implements java.io.Serializable {


     private long jnNo;
     private FaAccountCategory faAccountCategory;
     private SysOrg sysOrg;
     private HrEmp hrEmp;
     private Date jnDtm;
     private String jnCode;
     private String jnDescr;
     private String jnDocCode;
     private BigDecimal jnAmt;
     private Short jnStatusIsPosting;
     private String jnMemo;
     private Date jnCreatedDtm;
     private Set<FaJournalLine> faJournalLines = new HashSet<FaJournalLine>(0);
     private Set<FaGlTrans> faGlTranses = new HashSet<FaGlTrans>(0);

    public FaJournal() {
    }

	
    public FaJournal(long jnNo, BigDecimal jnAmt) {
        this.jnNo = jnNo;
        this.jnAmt = jnAmt;
    }
    public FaJournal(long jnNo, FaAccountCategory faAccountCategory, SysOrg sysOrg, HrEmp hrEmp, Date jnDtm, String jnCode, String jnDescr, String jnDocCode, BigDecimal jnAmt, Short jnStatusIsPosting, String jnMemo, Date jnCreatedDtm, Set<FaJournalLine> faJournalLines, Set<FaGlTrans> faGlTranses) {
       this.jnNo = jnNo;
       this.faAccountCategory = faAccountCategory;
       this.sysOrg = sysOrg;
       this.hrEmp = hrEmp;
       this.jnDtm = jnDtm;
       this.jnCode = jnCode;
       this.jnDescr = jnDescr;
       this.jnDocCode = jnDocCode;
       this.jnAmt = jnAmt;
       this.jnStatusIsPosting = jnStatusIsPosting;
       this.jnMemo = jnMemo;
       this.jnCreatedDtm = jnCreatedDtm;
       this.faJournalLines = faJournalLines;
       this.faGlTranses = faGlTranses;
    }
   
     @Id 

    
    @Column(name="JN_NO", unique=true, nullable=false)
    public long getJnNo() {
        return this.jnNo;
    }
    
    public void setJnNo(long jnNo) {
        this.jnNo = jnNo;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="JN_ACC_CAT_NO")
    public FaAccountCategory getFaAccountCategory() {
        return this.faAccountCategory;
    }
    
    public void setFaAccountCategory(FaAccountCategory faAccountCategory) {
        this.faAccountCategory = faAccountCategory;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="JN_ORG_NO")
    public SysOrg getSysOrg() {
        return this.sysOrg;
    }
    
    public void setSysOrg(SysOrg sysOrg) {
        this.sysOrg = sysOrg;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="JN_CREATED_BY_EMP_NO")
    public HrEmp getHrEmp() {
        return this.hrEmp;
    }
    
    public void setHrEmp(HrEmp hrEmp) {
        this.hrEmp = hrEmp;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="JN_DTM", length=19)
    public Date getJnDtm() {
        return this.jnDtm;
    }
    
    public void setJnDtm(Date jnDtm) {
        this.jnDtm = jnDtm;
    }

    
    @Column(name="JN_CODE", length=50)
    public String getJnCode() {
        return this.jnCode;
    }
    
    public void setJnCode(String jnCode) {
        this.jnCode = jnCode;
    }

    
    @Column(name="JN_DESCR", length=300)
    public String getJnDescr() {
        return this.jnDescr;
    }
    
    public void setJnDescr(String jnDescr) {
        this.jnDescr = jnDescr;
    }

    
    @Column(name="JN_DOC_CODE", length=50)
    public String getJnDocCode() {
        return this.jnDocCode;
    }
    
    public void setJnDocCode(String jnDocCode) {
        this.jnDocCode = jnDocCode;
    }

    
    @Column(name="JN_AMT", nullable=false, precision=15)
    public BigDecimal getJnAmt() {
        return this.jnAmt;
    }
    
    public void setJnAmt(BigDecimal jnAmt) {
        this.jnAmt = jnAmt;
    }

    
    @Column(name="JN_STATUS_IS_POSTING")
    public Short getJnStatusIsPosting() {
        return this.jnStatusIsPosting;
    }
    
    public void setJnStatusIsPosting(Short jnStatusIsPosting) {
        this.jnStatusIsPosting = jnStatusIsPosting;
    }

    
    @Column(name="JN_MEMO", length=500)
    public String getJnMemo() {
        return this.jnMemo;
    }
    
    public void setJnMemo(String jnMemo) {
        this.jnMemo = jnMemo;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="JN_CREATED_DTM", length=19)
    public Date getJnCreatedDtm() {
        return this.jnCreatedDtm;
    }
    
    public void setJnCreatedDtm(Date jnCreatedDtm) {
        this.jnCreatedDtm = jnCreatedDtm;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="faJournal")
    public Set<FaJournalLine> getFaJournalLines() {
        return this.faJournalLines;
    }
    
    public void setFaJournalLines(Set<FaJournalLine> faJournalLines) {
        this.faJournalLines = faJournalLines;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="faJournal")
    public Set<FaGlTrans> getFaGlTranses() {
        return this.faGlTranses;
    }
    
    public void setFaGlTranses(Set<FaGlTrans> faGlTranses) {
        this.faGlTranses = faGlTranses;
    }




}


